package com.triones.yjj.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import com.triones.yjj.entity.InviteRewardDO;
import com.triones.yjj.entity.MemberGroupPurchaseDO;
import com.triones.yjj.entity.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 活动管理 mapper 接口
 *
 * @Author: triones
 */
public interface InviteRewardMapper extends BaseMapperPlus<InviteRewardMapper, InviteRewardDO, InviteRewardVO> {

    /**
     * 邀请奖励
     * @param page
     * @param wrapper
     * @return
     */
    Page<WxInviteRewardVO> selectPageList(@Param("page") Page<InviteRewardDO> page, @Param(Constants.WRAPPER) Wrapper<InviteRewardDO> wrapper);

    /**
     * 活动送出奖励价值
     * @param activityId
     * @param userId
     * @return
     */
    Double getActivityRewardAmount(@Param("activityId") Long activityId, @Param("userId") Long userId);

    WxMemberInviteRewardVO getMemberRewardInfoByCode(@Param("verificationCode") String verificationCode);

    List<WxMemberInviteRewardVO> getMemberRewardList(@Param("memberId") Long memberId,@Param("userId") Long userId);

}
